﻿@{
    Layout = null;
}

<!DOCTYPE html>
@model System.Data.DataTable
<html>
<head>
    <title>Index</title>
        @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<script>
    $(document).ready(function () {
        $("#toolMenu").smartFloat();
        var hdjsAlert = $("#e").val();
    });
    function search() {
        $("#hidcls").val(issueID.GetText());
        $("#hidDateEdit1").val(DateEdit1.GetText());
        $("#hidDateEdit2").val(DateEdit2.GetText());
        
        form1.submit();
         //window.location.href = rootPath + '/htmlToStr?cls=' + issueID.GetText();
        //$("#content").attr("src", rootPath + '/AllowanceIssueSummarySheet/JSummarySheet?issueID=' + issueID.GetText());
    }


    function keyPress() {
        if (event.keyCode && event.keyCode == 13) {
            search();
        }
    }
</script>
</head>
<body onkeypress="keyPress()">
 @using (Html.BeginForm("ToExecl", "htmlToStr", FormMethod.Post, new { id = "form1" }))
 {
     @Html.Hidden("hidcls","")
      @Html.Hidden("hidDateEdit1", "")
       @Html.Hidden("hidDateEdit2", "")
     
 } 
        <table width="100%">
        <tr >
        <td align="center">
        <table><tr>
        <td >
        栏目编号:
        </td>
        <td>
        @Html.DevExpress().TextBox(settings =>
   {
       settings.Name = "issueID";
       settings.Width = 150;

   }).GetHtml()
        </td>
                <td >
        开始时间:
        </td>
        <td>
        @Html.DevExpress().DateEdit(settings =>
   {
       settings.Name = "DateEdit1";
       settings.Width = 150;

   }).GetHtml()
        </td>
                <td >
        结束时间:
        </td>
        <td>
        @Html.DevExpress().DateEdit(settings =>
   {
       settings.Name = "DateEdit2";
       settings.Width = 150;

   }).GetHtml()
        </td>
        <td>
 @Html.DevExpress().Button(settings =>
{
    settings.Name = "btnSearch";
    settings.Text = "查询";
    settings.ControlStyle.CssClass = "button";
    settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
    settings.ClientSideEvents.Click = "search";
}).GetHtml()
        </td>
        </tr></table>
        </td>
        </tr>
        </table>

        <table  width="100%">
     @for (int i = 0; i < Model.Rows.Count; i++)
     {
          <tr>
          @foreach (System.Data.DataColumn dc in Model.Columns)
          {
              <td>@Model.Rows[i][dc.ColumnName]</td> 
          }
          </tr>
     }
     </table>
</body>
</html>
